<template>
  <div class="execution">
    <basic-container class="title">
      <el-form :inline="true" :model="role" class="demo-form-inline">
        <el-form-item>
          <el-input v-model="role.user" placeholder="请输入供应商名称/姓名/手机号">
            <el-button slot="append" icon="el-icon-search"></el-button>
          </el-input>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="onSubmit">新增员工</el-button>
        </el-form-item>
      </el-form>
    <el-table
      :data="roleList"
      style="width: 100%">
      <el-table-column
        prop="loginAccount"
        label="登录账户"
        width="180">
      </el-table-column>
      <el-table-column
        prop="trueName"
        label="真实姓名"
        width="180">
      </el-table-column>
      <el-table-column
        prop="email"
        label="邮箱">
      </el-table-column>
      <el-table-column
        prop="phone"
        label="联系电话">
      </el-table-column>
      <el-table-column
        prop="department"
        label="所属部门">
      </el-table-column>
      <el-table-column
        prop="addTime"
        label="添加时间">
      </el-table-column>
      <el-table-column
        fixed="right"
        label="操作"
        width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
     </basic-container>
  </div>
</template>

<script>
  export default {
    name: "index",
    data() {
      return {
        role: {
          user: ''
        },
        roleList: [{
          loginAccount: '2016-05-02',
          trueName: '王小虎',
          email: '上海市普陀区金沙江路 1518 弄',
          phone: '15823849804',
          department: '15823849804',
          addTime: '15823849804',
        }, {
          loginAccount: '2016-05-02',
          trueName: '王小虎',
          email: '上海市普陀区金沙江路 1518 弄',
          phone: '15823849804',
          department: '15823849804',
          addTime: '15823849804'
        }]
      }
    },
    methods: {
      onSubmit() {
        console.log('submit!');
      },
      handleClick(row) {
        console.log(row);
      }
    }
  }
</script>

<style scoped>

</style>
